package com.redhipps.hips.client.widget;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Hyperlink;

public class Backlink extends Hyperlink {

  protected Backlink(String text, String targetHistoryToken) {
    super(text, true, targetHistoryToken);
  }

  public static Backlink create(String text, String historyToken, ClickListener listener) {
    text = "&laquo;&nbsp;" + text;
    Backlink backlink = new Backlink(text, historyToken);
    backlink.addClickListener(listener);
    return backlink;
  }
}
